package com.ruoyi.edge.service.impl;

import com.ruoyi.edge.domain.EdgeDevice;
import com.ruoyi.edge.mapper.EdgeDeviceMapper;
import com.ruoyi.edge.service.IEdgeDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class EdgeDeviceServiceImpl implements IEdgeDeviceService 
{
    @Autowired
    private EdgeDeviceMapper edgeDeviceMapper;

    /**
     * 查询设备信息
     * 
     * @param id 设备信息主键
     * @return 设备信息
     */
    @Override
    public EdgeDevice selectEdgeDeviceById(Long id)
    {
        return edgeDeviceMapper.selectEdgeDeviceById(id);
    }

    /**
     * 查询设备信息列表
     * 
     * @param edgeDevice 设备信息
     * @return 设备信息
     */
    @Override
    public List<EdgeDevice> selectEdgeDeviceList(EdgeDevice edgeDevice)
    {
        return edgeDeviceMapper.selectEdgeDeviceList(edgeDevice);
    }

    /**
     * 新增设备信息
     * 
     * @param edgeDevice 设备信息
     * @return 结果
     */
    @Override
    public int insertEdgeDevice(EdgeDevice edgeDevice)
    {
        return edgeDeviceMapper.insertEdgeDevice(edgeDevice);
    }

    /**
     * 修改设备信息
     * 
     * @param edgeDevice 设备信息
     * @return 结果
     */
    @Override
    public int updateEdgeDevice(EdgeDevice edgeDevice)
    {
        return edgeDeviceMapper.updateEdgeDevice(edgeDevice);
    }

    /**
     * 批量删除设备信息
     * 
     * @param ids 需要删除的设备信息主键
     * @return 结果
     */
    @Override
    public int deleteEdgeDeviceByIds(Long[] ids)
    {
        return edgeDeviceMapper.deleteEdgeDeviceByIds(ids);
    }

    /**
     * 删除设备信息信息
     * 
     * @param id 设备信息主键
     * @return 结果
     */
    @Override
    public int deleteEdgeDeviceById(Long id)
    {
        return edgeDeviceMapper.deleteEdgeDeviceById(id);
    }
}
